package order

import (
	order1 "shop/internal/models/order"
)

func UpdateStatus(orderId int) (*order1.Order, error) {
	return new(order1.Order).OrderUpdateByStatus(orderId)
}

func OrderDelById(orderId int) (*order1.Order, error) {
	return new(order1.Order).OrderDel(orderId)
}

func CancelOrder(orderId int) (*order1.Order, error) {
	return new(order1.Order).UpdStatus(orderId)
}

func UserOrder(userId int) ([]*order1.Order, error) {
	return new(order1.Order).UserByIdOrder(userId)
}

func OrderPay(orderId int) (*order1.Order, error) {
	return new(order1.Order).OrderUpd(orderId)
}

func OrderSearchByNo(orderNo string) (*order1.Order, error) {
	return new(order1.Order).OrderSearchByNo(orderNo)
}

func OrderWithProducts(orderId int) (*order1.Order, error) {
	return new(order1.Order).OrderSearchByID(orderId)
}
